<style type="text/css">
.content{
    background: #f1f4f6;
}
body.is-dialog {
    background: #f1f4f6;
}
.box{
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 3px solid #ffffff;
}
.text_div{
    padding-top: 7px;
}
.plupload-preview li, .faupload-preview li{
     margin-top: 0px;
     margin-bottom: 0px;
}
.li_div{
    float: left;
}
.li_div_info{
    float: right;
    padding-left: 10px;
    padding-top: 17px;
}
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<div class="box">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">文章ID:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.id}</div>
        </div>
    </div>

    {if $user}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">發佈用戶:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-images">
                <li class="li_div">
                    <div class="li_div">
                        <a href="{:cdnurl($user.avatar, true)}" target="_blank" class="thumbnail">
                            <img src="{:cdnurl($user.avatar, true)}" class="img-responsive">
                        </a>
                    </div>
                    <div class="li_div_info">
                        <div>{$user['nickname']}</div>
                        <div>{$user.mobile}</div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    {/if}
    {if $volunteer}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分配義工信息:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-images">
                <li class="li_div">
                    <div class="li_div">
                        <a href="{$volunteer.avatar}" target="_blank" class="thumbnail">
                            <img src="{$volunteer.avatar}" class="img-responsive">
                        </a>
                    </div>
                    <div class="li_div_info">
                        <div>{$volunteer.name}</div>
                        <div>{$volunteer.mobile}</div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">積分:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.score}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">互助標題:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.cat_name}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">互助分類:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.help_name}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">文章編號:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.task_no}</div>
        </div>
    </div>
    {if $row['video']}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">視頻:</label>
            <div class="col-xs-12 col-sm-8">

                    <video width="320" height="200" controls>
                      <source src="{:cdnurl($row.video, true)}" type="video/mp4">
                      <source src="{:cdnurl($row.video, true)}" type="video/ogg">
                      <source src="m{:cdnurl($row.video, true)}" type="video/webm">
                      <object data="{:cdnurl($row.video, true)}" width="320" height="200">
                        <embed src="{:cdnurl($row.video, true)}" width="320" height="200">
                      </object> 
                    </video>
            </div>
        </div>
    {/if}


        {if $row['images']}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">上傳圖片:</label>
                <div class="col-xs-12 col-sm-8">
                    <ul class="row list-inline faupload-preview" id="p-images">
                        {foreach name="$row['images']" item="voo"}
                        <li class="li_div">
                            <div class="li_div">
                                <a href="{:cdnurl($voo.images, true)}" target="_blank" class="thumbnail">
                                    <img src="{:cdnurl($voo.images, true)}" class="img-responsive">
                                </a>
                            </div>
                        </li>
                        {/foreach}
                    </ul>
                </div>
            </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">文案內容:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.content}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">狀態:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row['status_text']}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">發佈時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.createtime?datetime($row.createtime):''}</div>
        </div>
    </div>
</div>
</form>
